#include <iostream> 
#include <vector>
#include <string>
using namespace std;

struct TreeNode {
	int val;
	struct TreeNode *left;
	struct TreeNode *right;
	TreeNode(int x) :
			val(x), left(NULL), right(NULL) {
	}
};
class Solution {
public:
    vector<int> PrintFromTopToBottom(TreeNode* root) {
		 
    }
};

int main(){
    string s;
    cin >> s;
    if( (s.length()>1 && s[0]=='"'&&s[s.length()-1]=='"')|| (s.length()>2 s[0]=='"' && s[s.length()-1]=='"' && s[s.length()-2]!='\\' )){
    	int i;
    	for(i=1; i<s.length()-1; i++){
    		if(s[i]=='"' ){
    			if(s[i-1]!='\\') break;
				else{
					int cnt = 1;
					for(int j=i-2; j>0; j--) 
						if( s[j]=='\\') cnt++;
						else break;
					if( cnt%2==0 ) break;
				} 
			}
		}
		if( i==s.length()-1) cout << "true";
		else cout << "false";
	}else cout << "false";
    return 0;    
}
